]> permondes.de Git - Analog_Engine.git/blame - scripts/Gravity – 1-dimensional.LACE
Application Gravity
[Analog_Engine.git] / scripts / Gravity – 1-dimensional.LACE
CommitLineData
44e09cca
P
1# Gravity – 1-dimensional.LACE
2# The small mass m moves along the direct connection line towards mass M.
3# r'' = -gamma*M / r^2
4
5coefficient(1): +1 -> r0' # -1 to move initially towards M, +1 to move away from it
6coefficient(2): -1 -> -r0 # initial distance of m to M
7coefficient(3): +1 -> gamma*M # will be inverted in division
8
9iintegrate r'' -> -r'
10 IC: r0'
11iintegrate -r' -> r
12 IC: -r0
13multiply r, r -> r^2
14idivide gamma*M, r^2 -> -gamma*M/r^2
15assign -gamma*M/r^2 -> r''
16
17output(x): r # distance
18invert -r' -> r'
19output(y): r' # speed and direction
20output(z): r'' # acceleration (always towards M)